#include <bits/stdc++.h>
#include <string>

using namespace std;

#define int long long

signed main()
{
    string s;
    cin >> s;
    int begin = -1 , len = 0;
    for(int i = 0;i < s.size();i ++)
    {
        if(s[i] >= '0' && s[i] <= '9')
        {
            int j = i;
            while(j < s.size() && s[j] >= '0' && s[j] <= '9') j ++;
            if(j - i > len)
            {
                begin = i;
                len = j - i;
            }
            i = j;
        }
    }
    if(begin == -1) cout << "" << endl;
    else cout << s.substr(begin , len) << endl;
    return 0;
}